<template>
    <div class="com-cnt">
        <ul>
            <li v-for="lists in list">
                <div>
                    <span class="li_top_l">{{lists.streamEx}}</span>
                    <span v-show="lists.status == 1" class="li_top_r">进行中</span>
                    <span v-show="lists.status == 0" class="li_top_r">已完成</span>
                </div>
                <div>
                    <span class="li_bot_l">{{lists.strOT}}</span>
                    <span class="li_bot_r">
                        <span>{{lists.sourceType == 1? "+":"-"}}</span>
                        <!--<span></span>-->
                        <span class="num">{{lists.turnover}}</span>
                    </span>
                </div>
            </li>
        </ul>
        <div v-show="list.length == 0" :style="emptyimg" style="width:100%;height:100%">

        </div>

    </div>
</template>

<script>
import http from "@/assets/js/axios";
import { domain } from '@/assets/js/config'
import $ from 'jquery'
import { maskTips } from '@/assets/js/dom'
export default {
    data() {
        return {
            dats: '',
            list: [],
            emptyimg: {backgroundImage: "url(" + require("@/assets/imgs/manage/jfempty.png") + ")",
                backgroundRepeat: "no-repeat",
                backgroundSize: "100%",
                marginTop: "5px"}
        }
    },
    components: {

    },
    mounted() {
        this.getReason();
    },
    methods: {
        direct: function (val) {
            this.$router.push({ path: '/' + val });
        },
        // 用户信息
        getReason: async function () {
            let userInfo = JSON.parse(sessionStorage.getItem('UserInfo'))
            let userToken = localStorage.getItem("token") || ''
            let postDo = {
                assets_type: '2'
            };
            const res = await http.post('xshk/f/assetsStream/query?token=' + userToken, postDo)
            if (res.data.code == -5) {
                maskTips({ id: "bal-fail", txt: res.data.message })
                this.$router.push('/login')
                return false;
            }
            if (res.status == 200) {
                this.list = res.data.data;
            }
        }
    }
}
</script>

<style  scoped>
.com-cnt{
    width: 100%;
    height: 80%
}
ul{
    width: 100%;
    border-top:1px solid #f2f2f2;
    /* margin-top: .92rem; */
  }
  ul li{
    padding: .18rem .4rem;
    box-sizing: border-box;
    width:100%;
    height:1.22rem;
    color:#9f9f9f;
    border-bottom:1px solid #f2f2f2;
    position: relative;
  }
  ul li div{
    width:100%;
    height:50%;
    overflow: hidden;
  }
  ul li div .li_top_l{
    color:#383838;
    font-size:.32rem;
    font-weight:900;
    float:left;
    font-family: 'PingFang-SC-Heavy';
  }
  ul li div .li_top_r{
    font-size: .27rem;
    font-weight: 600;
    float: right;
    color:#333;
    font-family: 'PingFang-SC-Medium';
  }
  ul li div .li_bot_l{
    font-size: .28rem;
    font-weight: 500;
    float: left;
    font-family: 'PingFang-SC-Regular';
  }
  ul li div .li_bot_r{
    font-size: .28rem;
    font-weight: 500;
    float: right;
    font-family: 'PingFang-SC-Medium';
  }
</style>
